﻿using EntityFrameworks.Entity.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IRepository.Core
{
    /// <summary>
    /// 做为一个持久化机制的实现，它可能是ado.net,linq2sql,entityframeworks,nhibernate,redis,memoryStream,fileStream etc.
    /// 宗旨：我们不应该将数据持久化的方式暴露到业务（领域）层
    /// 建立仓储：为每个聚合根建立仓储接口和实现，而不是为每个实体
    /// 使用仓储：应该根据使用场景去声明为仓储，而不是每次都是IExtensionRepository
    /// </summary>
    /// <typeparam name="TEntity"></typeparam>
    public class DemoContextRepository<TEntity> :
        IExtensionRepository<TEntity>
        where TEntity : class
    {

        public void Insert(IEnumerable<TEntity> item)
        {
            throw new NotImplementedException();
        }

        public void Update(IEnumerable<TEntity> item)
        {
            throw new NotImplementedException();
        }

        public void Delete(IEnumerable<TEntity> item)
        {
            throw new NotImplementedException();
        }

        public void Update<T>(System.Linq.Expressions.Expression<Action<T>> entity) where T : class
        {
            throw new NotImplementedException();
        }

        public IQueryable<TEntity> GetModel(EntityFrameworks.Entity.Core.Specification.ISpecification<TEntity> specification)
        {
            throw new NotImplementedException();
        }

        public IQueryable<TEntity> GetModel(System.Linq.Expressions.Expression<Func<TEntity, bool>> predicate)
        {
            throw new NotImplementedException();
        }

        public TEntity Find(System.Linq.Expressions.Expression<Func<TEntity, bool>> predicate)
        {
            throw new NotImplementedException();
        }

        public TEntity Find(EntityFrameworks.Entity.Core.Specification.ISpecification<TEntity> specification)
        {
            throw new NotImplementedException();
        }

        public void BulkInsert(IEnumerable<TEntity> item, bool isRemoveIdentity)
        {
            throw new NotImplementedException();
        }

        public void BulkInsert(IEnumerable<TEntity> item)
        {
            throw new NotImplementedException();
        }

        public void BulkUpdate(IEnumerable<TEntity> item, params string[] fieldParams)
        {
            throw new NotImplementedException();
        }

        public void BulkDelete(IEnumerable<TEntity> item)
        {
            throw new NotImplementedException();
        }

        public event Action<SavedEventArgs> AfterSaved;

        public event Action<SavedEventArgs> BeforeSaved;

        public void Insert(TEntity item)
        {
            throw new NotImplementedException();
        }

        public void Delete(TEntity item)
        {
            throw new NotImplementedException();
        }

        public void Update(TEntity item)
        {
            throw new NotImplementedException();
        }

        public IQueryable<TEntity> GetModel()
        {
            throw new NotImplementedException();
        }

        public TEntity Find(params object[] id)
        {
            throw new NotImplementedException();
        }



        public IQueryable<TEntity> GetModel(Action<IOrderable<TEntity>> orderBy)
        {
            throw new NotImplementedException();
        }

        public IQueryable<TEntity> GetModel(Action<IOrderable<TEntity>> orderBy, EntityFrameworks.Entity.Core.Specification.ISpecification<TEntity> specification)
        {
            throw new NotImplementedException();
        }

        public IQueryable<TEntity> GetModel(Action<IOrderable<TEntity>> orderBy, System.Linq.Expressions.Expression<Func<TEntity, bool>> predicate)
        {
            throw new NotImplementedException();
        }

        public IQueryable<TEntity> GetEntities(EntityFrameworks.Entity.Core.Specification.ISpecification<TEntity> specification)
        {
            throw new NotImplementedException();
        }

        public IQueryable<TEntity> GetEntities()
        {
            throw new NotImplementedException();
        }

        public IQueryable<TEntity> GetEntities(System.Linq.Expressions.Expression<Func<TEntity, bool>> predicate)
        {
            throw new NotImplementedException();
        }
    }
}
